home *** CD-ROM | disk | FTP | other *** search
- -- card: 2833 from stack: in
- -- bmap block id: 0
- -- flags: 0000
- -- background id: 2794
- -- name:
- ----- HyperTalk script -----
- on appleEvent
- global gFileName
-
- if gFileName is empty then
- beep
- answer "No output file has been opened!"&return&return& "Use the “Log to File” button."
- else
- request appleevent data of keyword "info"
- put number of lines in it into X
- write line 1 to x-3 of it to file gFileName
- end if
- end appleEvent
-
-
- on UpdateBtns
- global gFileName
- set the visible of cd btn "log to file" to (gFileName="")
- set the visible of cd btn "close file" to (gFileName≠"")
- end UpdateBtns
-
- on opencard
- UpdateBtns
- end opencard
-
-
- -- part 2 (button)
- -- low flags: 00
- -- high flags: A004
- -- rect: left=41 top=257 right=294 bottom=161
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Log to File
- ----- HyperTalk script -----
- on mouseUp
- ask file "Log to what file?"
- if it ≠ "" then
-
- global gFileName
- put it into gFileName
- open file gFilename
- end if
-
- UpdateBtns
- end mouseUp
-
-
- -- part 3 (button)
- -- low flags: 80
- -- high flags: A004
- -- rect: left=186 top=257 right=294 bottom=306
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Close File
- ----- HyperTalk script -----
- on mouseUp
- set cursor to 4
- global gFileName
- close file gFileName
-
- put gFileName into thePath
- put empty into gFileName
- UpdateBtns
-
- answer "The file was created:"&return &return &thePath
- end mouseUp
-